<?php

namespace app\admin\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class UserMoneyLog extends Model
{	


	 public function userInfo()
    {
        return $this->hasone("user", 'u_id', "u_id");
    }



    public static function getOpType($int = 0)
    {
        $res = [
            1 => '充值',
            2 => '提现',
            3 => '任务扣除',
            4 => '任务奖励',
            5 => '退回',
            6 => '平账',
        ];

        return $int > 0 ? $res[$int] : $res;
    }
}
